package com.example.shushiyunsst.fragment.main.home.child.miner22

import android.content.Context
import android.view.View
import com.example.library_common.utils.PixUtils
import com.example.shushiyunsst.R
import com.lxj.xpopup.core.CenterPopupView

class NeedIdentifyVerifyPop(context: Context) : CenterPopupView(context) {

    override fun getImplLayoutId(): Int {
        return R.layout.need_identify_verify_pop
    }

    private var toIdentityListener:ToIdentityListener?=null

    fun setToIdentityListener( toIdentityListener:ToIdentityListener?):NeedIdentifyVerifyPop{
        this.toIdentityListener=toIdentityListener
        return this
    }

    override fun getPopupHeight(): Int {
        return PixUtils.dp2px(300)
    }

    override fun onDismiss() {
        super.onDismiss()
        toIdentityListener=null
    }

    override fun onCreate() {
        super.onCreate()
        findViewById<View>(R.id.dismiss).setOnClickListener { dismiss() }

        findViewById<View>(R.id.toIdentity).setOnClickListener {
            toIdentityListener?.onIdentity()
            dismiss()
        }
    }

        interface ToIdentityListener{
            fun onIdentity()
        }
}